#include<iostream>
#include "TCP_Client.h"
using namespace std;

int main(int argc, char **argv)
{
	TCP_Client client(9877,argv[1]);
	client.Socket();
	if(client.Connect()==0)
	{
		if(strcmp(argv[2], "-list") == 0)
			client.SendRequestandRecieve("file.list");
		else
			client.SendRequestandRecieve(argv[2]);
		client.DisplayFile();
		client.Close();
	}
	else
	{
		cout<<"Server may not be running"<<'\n'<<endl;
	}
	cout<<"Hello,World!\n";

}
